var express = require('express');
var router = express.Router();
var tc = require('../my_modules/torrent_client');

/* GET home page. */
router.get('/', function(req, res) {
  if(req.session.username){
      tc.start(req.session.username);
      res.render('index');
  }
  else
    res.render('login');
});

module.exports = router;
